import type { AxiosRequestConfig, InternalAxiosRequestConfig, AxiosResponse } from 'axios';

export interface RequestInterceptors<T> {
    requestInterceptors?: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig
    requestInterceptorsCatch?: (err: any) => any
    responseInterceptors?: (config: T) => T
    responseInterceptorsCatch?: (err: any) => any
}

export interface RequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
    interceptors?: RequestInterceptors<T> // 请求拦截器
}

// export {
//     AxiosResponse,
//     RequestInterceptors,
//     RequestConfig
// }
